package constant

import (
	"github.com/lab-online/pkg/gen"
	"github.com/lab-online/pkg/resp"
)

const (
	baseSuccessCode       = resp.CodeSuccess + domainCode
	CodeSuccessRegister   = baseSuccessCode + 0
	CodeSuccessLogin      = baseSuccessCode + 1
	CodeGetProfileSuccess = baseSuccessCode + 2
	CodeSuccessDelete     = baseSuccessCode + 3
	CodeSuccessUpdate     = baseSuccessCode + 4
	CodeSuccessImport     = baseSuccessCode + 5
	CodeSuccessSearch     = baseSuccessCode + 6
	CodeSuccessRefresh    = baseSuccessCode + 7
)

func SuccessCodeMap() gen.CodeMap {
	return gen.CodeMap{
		"Register": {
			CodeSuccessRegister: "注册成功",
		},
		"Login": {
			CodeSuccessLogin: "登录成功",
		},
		"GetProfile": {
			CodeGetProfileSuccess: "获取用户信息成功",
		},
		"DeleteUser": {
			CodeSuccessDelete: "删除用户成功",
		},
		"UpdateUser": {
			CodeSuccessUpdate: "更新用户信息成功",
		},
		"UpdatePassword": {
			CodeSuccessUpdate: "更新用户密码成功",
		},
		"ImportStudent": {
			CodeSuccessImport: "学生导入成功",
		},
		"SearchUser": {
			CodeSuccessSearch: "搜索用户成功",
		},
		"RefreshToken": {
			CodeSuccessRefresh: "token刷新成功",
		},
	}
}
